"""
URL configuration for Django_learning project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from . import view

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', view.index),
    # 这里定义视图函数传递整数的参数N
    path("page/<int:n>/<str:op>/<int:m>", view.page),
    path("page/<str:name>/<int:age>", view.usually),
    path("index/<str:content>", view.main_page),
    path("mypage/", view.my_page),
    path("sum/", view.sum_number),
    path("login/", view.login_in),
    path("article.html/", view.article),
    path("myphoto.html/", view.photo),
    path("register.html/", view.register),
    path("login.html/", view.login),
    path("parameter/", view.get_parameter),
    path("caculator/", view.page_caculator),
    path("fortag/", view.page_for_tag),
    path("filter/", view.page_grep_tag),
    path("base/", view.page_parent),
    path("news/", view.page_news, name="news"),
    path("music/", view.page_music, name="music"),
    path("page<int:n>/", view.page_item, name="pagen")
    # 手动配置静态路由位置
    # re_path(r"^static/(?P<path>.*)$",static.serve,{"document_root":settings.STATIC_ROOT})
]
